<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户登录</title>
    <!-- Google Font: Source Sans Pro -->
    <link rel="stylesheet"
        href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="./plugins/fontawesome-free/css/all.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
    <!-- Tempusdominus Bootstrap 4 -->
    <link rel="stylesheet" href="./plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
    <!-- iCheck -->
    <link rel="stylesheet" href="./plugins/icheck-bootstrap/icheck-bootstrap.min.css">
    <!-- JQVMap -->
    <link rel="stylesheet" href="./plugins/jqvmap/jqvmap.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="./css/adminlte.min.css">
    <!-- overlayScrollbars -->
    <link rel="stylesheet" href="./plugins/overlayScrollbars/css/OverlayScrollbars.min.css">
    <!-- Daterange picker -->
    <link rel="stylesheet" href="./plugins/daterangepicker/daterangepicker.css">
    <!-- summernote -->
    <link rel="stylesheet" href="./plugins/summernote/summernote-bs4.min.css">
    <!-- BootstrapTable -->
    <link rel="stylesheet" href="./plugins/bootstraptable/bootstrap-table.min.css">
    <link rel="stylesheet" href="./css/login.css">
</head>

<body>
    <p class="head">健康导医助手系统</p>
    <div class="container right-panel-active">
        <!-- 登录 -->
        <div class="container__form container--signin">
            <form action="#" class="form" id="form2">
                <h2 class="form__title">登录</h2>
                <input type="text" class="input" id="name" name="name" placeholder="请输入姓名">
                <input type="password" class="input" id="password" name="password" placeholder="请输入密码">
                <select class="input" id="userRole1" name="userRole1">
                    <option value="patient">患者</option>
                    <option value="doctor">医生</option>
                    <option value="admin">管理员</option>
                </select>
                <a href="./forget.html" class="link">Forgot your password?</a>
                <a href="#" class="link" id="forgotPassword">忘记密码？</a>
                <button class="btn" onclick="login();">登录</button>
            </form>
        </div>
        <!-- 注册 -->
        <div class="container__form container--signup">
            <form action="#" class="form" id="form1">
                <h2 class="form__title">注册</h2>
                <label for="userRole">请选择注册身份</label>
                <select class="input" id="userRole" name="userRole">
                    <option value="patient">患者</option>
                    <option value="doctor">医生</option>
                    <option value="admin">管理员</option>
                </select>
                <button class="btn" id="registerButton" data-toggle="modal" data-target="#roleModal">
                    注册
                </button>
            </form>
        </div>
        <!-- Overlay -->
        <div class="container__overlay">
            <div class="overlay">
                <div class="overlay__panel overlay--left">
                    <button class="btn" id="signIn">登录</button>
                </div>
                <div class="overlay__panel overlay--right">
                    <button class="btn" id="signUp">注册</button>
                </div>
            </div>
        </div>
        <!-- 管理员信息模态框 -->
        <div class="modal fade" id="adminModal" tabindex="-1" role="dialog" aria-labelledby="AdminModalLabel"
            aria-hidden="true">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                        <h4 class="modal-title">管理员信息</h4>
                    </div>
                    <div class="modal-body">
                        <form id="adminForm">
                            <div class="form-group">
                                <label for="adminName">管理员姓名</label>
                                <input type="text" class="form-control" id="adminName" name="adminName"
                                    placeholder="管理员姓名" required minlength="2" maxlength="10">
                            </div>
                            <div class="form-group">
                                <label for="adminPassword">管理员密码</label>
                                <input type="password" class="form-control" id="adminPassword" name="adminPassword"
                                    placeholder="管理员密码" required>
                            </div>
                            <div class="modal-footer">
                                <button type="submit" class="btn btn-primary" id="saveAdminBtn">保存</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!-- 患者信息模态框 -->
        <div class="modal fade" id="patientModal" tabindex="-1" role="dialog" aria-labelledby="patientModalLabel"
            aria-hidden="true">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                        <h4 class="modal-title">患者信息</h4>
                    </div>
                    <div class="modal-body">
                        <form id="patientForm">
                            <div class="form-group">
                                <label for="patientName">患者姓名</label>
                                <input type="text" class="form-control" id="patientName" name="patientName"
                                    placeholder="患者姓名" required minlength="2" maxlength="10">
                            </div>
                            <div class="form-group">
                                <label for="patientNo">患者登录账号</label>
                                <input type="text" class="form-control" id="patientNo" name="patientNo"
                                    placeholder="患者登录账号" required minlength="2" maxlength="10">
                            </div>
                            <div class="form-group">
                                <label for="patientPassword">患者登录密码</label>
                                <input type="password" class="form-control" id="patientPassword" name="patientPassword"
                                    placeholder="患者登录密码" required>
                            </div>
                            <div class="form-group">
                                <label for="patientPhone">患者手机号</label>
                                <input type="text" class="form-control" id="patientPhone" name="patientPhone"
                                       placeholder="患者手机号" required minlength="11" maxlength="11">
                            </div>
                            <div class="form-group">
                                <label for="patientSex">性别</label>
                                <select class="form-control" id="patientSex" name="patientSex">
                                    <option value="1">男</option>
                                    <option value="2">女</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label for="patientAge">年龄</label>
                                <input type="text" class="form-control" id="patientAge" name="patientAge"
                                    placeholder="年龄" required>
                            </div>
                            <div class="modal-footer">
                                <button type="submit" class="btn btn-primary" id="savePatientBtn">保存</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!-- 医生信息模态框 -->
        <div class="modal fade" id="doctorModal" tabindex="-1" role="dialog" aria-labelledby="doctorModalLabel"
            aria-hidden="true">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                        <h4 class="modal-title">医生信息</h4>
                    </div>
                    <div class="modal-body">
                        <form id="doctorForm">
                            <div class="form-group">
                                <label for="dNickName">医生姓名</label>
                                <input type="text" class="form-control" id="dNickName" name="dNickName"
                                       placeholder="医生姓名" required minlength="2" maxlength="10">
                            </div>
                            <div class="form-group">
                                <label for="doctorJobNo">医生工号</label>
                                <input type="text" class="form-control" id="doctorJobNo" name="doctorJobNo"
                                    placeholder="医生工号" required minlength="10" maxlength="10">
                            </div>
                            <div class="form-group">
                                <label for="doctorPassword">医生登录密码</label>
                                <input type="password" class="form-control" id="doctorPassword" name="doctorPassword"
                                    placeholder="医生登录密码" required>
                            </div>
                            <div class="form-group">
                                <label for="profession">职称</label>
                                <select class="form-control" id="profession" name="profession">
                                    <option value="初级">医师</option>
                                    <option value="中级">主治医师</option>
                                    <option value="副高级">副主任医师</option>
                                    <option value="正高级">主任医师</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label for="doctorSex">性别</label>
                                <select class="form-control" id="doctorSex" name="doctorSex">
                                    <option value="1">男</option>
                                    <option value="2">女</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label for="doctorAge">年龄</label>
                                <input type="text" class="form-control" id="doctorAge" name="doctorAge"
                                    placeholder="年龄" required>
                            </div>
                            <div class="form-group">
                                <label for="university">毕业院校</label>
                                <input type="text" class="form-control" id="university" name="university"
                                       placeholder="毕业院校" required>
                            </div>
                            <div class="form-group">
                                <label for="education">学历</label>
                                <select class="form-control" id="education" name="education">
                                    <option value="专科">专科</option>
                                    <option value="本科">本科</option>
                                    <option value="硕士">硕士</option>
                                    <option value="博士">博士</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label for="major">专业</label>
                                <input type="text" class="form-control" id="major" name="major"
                                       placeholder="专业" required>
                            </div>
                            <div class="form-group">
                                <label for="workday">开始工作时间</label>
                                <input type="date" class="form-control" id="workday" name="workday"
                                       value="2018-07-22" min="1950-01-01" max="2024-11-14" required>
                            </div>
                            <div class="form-group">
                                <label for="about">医生介绍</label>
                                <input type="text" class="form-control" id="about" name="about"
                                       placeholder="医生介绍" required>
                            </div>
                            <div class="form-group">
                                <label for="photo">照片</label>
                                <input type="file" id="photo" name="photo"
                                       accept="image/png, image/jpeg">
                            </div>
                            <div class="modal-footer">
                                <button type="submit" class="btn btn-primary" id="saveDoctorBtn">保存</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!-- 患者密码恢复模态框 -->
        <div class="modal fade" id="patientPasswordModal" tabindex="-1" role="dialog"
            aria-labelledby="patientPasswordModalLabel" aria-hidden="true">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title">患者密码恢复</h5>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body">
                        <form id="patientPasswordRecoveryForm">
                            <div class="form-group">
                                <label for="patientNameP">患者登录账号</label>
                                <input type="text" class="form-control" id="patientNameP" name="patientNameP"
                                    placeholder="请输入登录账号" required>
                            </div>
                            <div class="form-group">
                                <label for="newPatientPassword">新密码</label>
                                <input type="password" class="form-control" id="newPatientPassword" name="newPatientPassword"
                                    placeholder="请输入新密码" required>
                            </div>
                            <!-- 根据需要添加额外字段 -->
                            <button type="submit" class="btn btn-primary">提交</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!-- 医生密码恢复模态框 -->
        <div class="modal fade" id="doctorPasswordModal" tabindex="-1" role="dialog"
            aria-labelledby="doctorPasswordModalLabel" aria-hidden="true">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title">医生密码恢复</h5>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body">
                        <form id="doctorPasswordRecoveryForm">
                            <div class="form-group">
                                <label for="doctorJobNoP">医生工号</label>
                                <input type="text" class="form-control" id="doctorJobNoP" name="doctorJobNoP"
                                    placeholder="请输入工号" required>
                            </div>
                            <div class="form-group">
                                <label for="newDoctorPassword">新密码</label>
                                <input type="password" class="form-control" id="newDoctorPassword" name="newDoctorPassword"
                                    placeholder="请输入新密码" required>
                            </div>
                            <!-- 根据需要添加额外字段 -->
                            <button type="submit" class="btn btn-primary">提交</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!-- 管理员密码恢复模态框 -->
        <div class="modal fade" id="adminPasswordModal" tabindex="-1" role="dialog"
            aria-labelledby="adminPasswordModalLabel" aria-hidden="true">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <h5 class="modal-title">管理员密码恢复</h5>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body">
                        <form id="adminPasswordRecoveryForm">
                            <div class="form-group">
                                <label for="adminNameP">管理员姓名</label>
                                <input type="text" class="form-control" id="adminNameP" name="adminNameP"
                                    placeholder="请输入姓名" required>
                            </div>
                            <div class="form-group">
                                <label for="newAdminPassword">新密码</label>
                                <input type="password" class="form-control" id="newAdminPassword" name="newAdminPassword"
                                    placeholder="请输入新密码" required>
                            </div>
                            <!-- 根据需要添加额外字段 -->
                            <button type="submit" class="btn btn-primary">提交</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- jQuery -->
    <script src="./plugins/jquery/jquery.min.js"></script>
    <!-- Bootstrap 4 -->
    <script src="./plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
    <!-- BootstrapTable -->
    <script src="./plugins/bootstraptable/bootstrap-table.min.js"></script>
    <script src="./plugins/bootstraptable/locale/bootstrap-table-zh-CN.min.js"></script>
    <script src="./pagejs/login/login.js"></script>
    <script>
        $(document).ready(function () {
            $('#form2').submit(function (event) {
                event.preventDefault();
                var name = $('#name').val();
                // 将姓名存储在localStorage中
                localStorage.setItem('name', name);
            });
            // console.log(localStorage.getItem('name'));
        });
    </script>
</body>
</html>